package com.xczz.service;

import com.xczz.common.result.TableDataInfo;
import com.xczz.model.SysUser;
import com.xczz.model.vo.SysUserVO;
import org.springframework.data.domain.Pageable;


import java.util.List;
import java.util.Optional;

public interface SysUserService {
    // 获取所有用户
    List<SysUser> getAllUsers();

    // 根据ID获取用户
    Optional<SysUser> getUserById(Long userId);

    // 创建用户
    SysUser createUser(SysUser user);

    // 更新用户
    SysUser updateUser(Long userId, SysUser user);

    // 删除用户
    void deleteUser(Long userId);

    int deleteUserByIds(Long[] userIds);

    String checkUserNameUnique(String userName);

    String checkPhoneUnique(SysUserVO userInfo);

    String checkEmailUnique(SysUserVO userInfo);

    boolean insertUser(SysUserVO user);

    public TableDataInfo selectUserList(SysUserVO user, Pageable page);

    boolean updateUser(SysUserVO user);

    SysUser selectUserById(Long userId);

    SysUser selectUserByUserName(String userName);
}
